//
//  TopicCollectionViewCell.m
//  礼物go
//
//  Created by dllo on 16/5/25.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "TopicCollectionViewCell.h"

@interface TopicCollectionViewCell ()

@property(nonatomic,strong)UIImageView *bgImageView;

@end

@implementation TopicCollectionViewCell

-(instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        [self createSubviews];
    }
    return self;
}

-(void)createSubviews{
    self.bgImageView = [[UIImageView alloc] initWithFrame:self.contentView.bounds];
   // self.bgImageView.backgroundColor = [UIColor purpleColor];
    [self.contentView addSubview:self.bgImageView];
    
}

-(void)layoutSubviews{
    self.bgImageView.frame = self.contentView.bounds;
}

-(void)setTopicModel:(TopicModel *)topicModel{
    _topicModel = topicModel;
    [self.bgImageView sd_setImageWithURL:[NSURL URLWithString:_topicModel.banner_image_url] placeholderImage:[UIImage imageNamed:@"picholder"]];
}



@end
